package com.xoa.controller.event;

import com.xoa.model.event.TimeLineViewUser;
import com.xoa.service.event.TimeLineViewUserService;
import com.xoa.util.ToJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by 张丽军 on 2017/9/1.
 */
@RestController
@RequestMapping("/timeLineViewUser")
public class TimeLineViewUserController {

    @Autowired
    TimeLineViewUserService timeLineViewUserService;


    /**
     * 创建作者:   张丽军
     * 创建日期:   2017-09-01 下午14:31:25
     * 方法介绍:   修改大事记查看用户信息
     * @param request
     * @param timeLineViewUser
     * @return
     */
    @ResponseBody
    @RequestMapping("/updateTimeLineViewUser")
    public ToJson<TimeLineViewUser> updateTimeLineViewUser(HttpServletRequest request,TimeLineViewUser timeLineViewUser){
        return timeLineViewUserService.updateTimeLineViewUser(request,timeLineViewUser);
    }
    /**
     * 创建作者:   张丽军
     * 创建日期:   2017-09-01 下午14:31:25
     * 方法介绍:   新建大事记查看用户信息
     * @param request
     * @param timeLineViewUser
     * @return
     */
    @ResponseBody
    @RequestMapping("/addTimeLineViewUser")
    public ToJson<TimeLineViewUser> addTimeLineViewUser(HttpServletRequest request,TimeLineViewUser timeLineViewUser){
        return timeLineViewUserService.addTimeLineViewUser(request,timeLineViewUser);
    }
}
